import request from '@/utils/request'

// 大礼包
export function listGift(query) {
  return request({
    url: '/app/hps/gift/list',
    method: 'get',
	params: query
  })
}

export function giftInfo(id) {
  return request({
    url: '/app/hps/gift/'+id,
    method: 'get'
  })
}
//查询当前用户积分
export function getUserIntegral(id) {
  return request({
    url: '/app/hps/gift/getUserIntegral?id='+id,
    method: 'get',
  })
}

//兑换礼包
export function exchangeGift(data) {
  return request({
    url: '/app/hps/gift/exchangeGift',
    method: 'post',
	data: data
  })
}

// 兑换记录列表
export function listGiftExchange(query) {
  return request({
    url: '/app/hps/gift/listGiftExchange',
    method: 'get',
	params: query
  })
}

// 当前用户最新兑换记录
export function getHpsGiftExchangeByMaxId(query) {
  return request({
    url: '/app/hps/gift/getHpsGiftExchangeByMaxId',
    method: 'get',
	params: query
  })
}